# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


class FinanceDataItem(scrapy.Item):
    # Common fields
    data_type = scrapy.Field()  # Type of data: 'revenue', 'expenditure', 'tax', 'fund'
    year = scrapy.Field()
    month = scrapy.Field()
    date = scrapy.Field()  # Publication date
    
    # For revenue and expenditure data
    level = scrapy.Field()  # National or local
    amount = scrapy.Field()
    growth_rate = scrapy.Field()
    
    # For tax data
    tax_type = scrapy.Field()  # VAT, corporate income tax, etc.
    tax_amount = scrapy.Field()
    tax_growth_rate = scrapy.Field()
    
    # For government fund budget data
    fund_type = scrapy.Field()
    fund_revenue = scrapy.Field()
    fund_expenditure = scrapy.Field()
    fund_growth_rate = scrapy.Field()
    
    # Raw data for storage
    raw_data = scrapy.Field()
